package com.originskyseed.platform.user.model;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.originskyseed.platform.core.base.BaseModel;

/**
 * 用户信息表（OSI_USER_INFO）
 *
 * @author tangwanghui
 */
public class UserInfo extends BaseModel {

	/**
	 * 用户账号（ACCOUNT）
	 */
	private String account;

	/**
	 * 用户名称（NAME）
	 */
	private String name;

	/**
	 * 用户密码（PASSWORD）
	 */
	private String password;

	/**
	 * 权限密码（PERMISSION_PASSWORD）
	 */
	private String permissionPassword;

	/**
	 * 员工编码（NICK_NAME）
	 */
	private String userNum;

	/**
	 * 部门id（DEPT_ID）
	 */
	private String deptId;

	/**
	 * 手机号（PHONE）
	 */
	private String phone;

	/**
	 * 状态（0 禁用,1 启用，2 待审核 3审核不通过 4账号锁定 5账号冻结）（STATUS）
	 */
	private Integer status;

	/**
	 * 头像（HEAD_PORTRAIT）
	 */
	private String headPortrait;

	/**
	 * 身份证号码
	 */
	private String idCardNum;

	/**
	 * 身份证正面图片（ID_CARD_PIC）
	 */
	private String idCardPic;

	/**
	 * 身份证反面图片（ID_CARD_BACKPIC）
	 */
	private String idCardBackpic;

	/**
	 * 手持身份证图片（ID_CARD_HOLD）
	 */
	private String idCardHold;

	/**
	 * 银行卡号（BANK_ACCOUNT）
	 */
	private String bankAccount;

	/**
	 * 开户银行名称（BANK）
	 */
	private String bank;

	/**
	 * 支行名称（BRANCH）
	 */
	private String branch;

	/**
	 * 优先级（PRIORITY）
	 */
	private Integer priority;

	/**
	 * 备注（REMARK）
	 */
	private String remark;

	/**
	 * 邀请码（INVITATION_CODE）
	 */
	private String invitationCode;

	/**
	 * 第三方平台账号（OTHER_ACCOUNT）
	 */
	private String otherAccount;

	/**
	 * 逻辑删除标志（1——已删除，0——未删除）（IS_DEL）
	 */
	private Integer isDel;

	/**
	 * 类型（0总裁 1体系 2分公司/频道 3部门 4事业厅 5小组 6业务员）（TYPE）
	 */
	private Integer type;

	/**
	 * 来源 1推广类/公会、2内容类/家族、3合作类（SOURCE_SYS）
	 */
	private Integer sourceSys;

	/**
	 * 最后登录时间（FINALLY_LOGIN_TIME）
	 */
	private Date finallyLoginTime;

	/**
	 * 最后登录地址（FINALLY_LOGIN_IP）
	 */
	private String finallyLoginIp;

	/**
	 * 创建人id（CREATOR_ID）
	 */
	private String creatorId;

	/**
	 * 创建人（CREATOR）
	 */
	private String creator;

	/**
	 * 密码最后修改时间（UPDATE_PASS_TIME）
	 */
	private Date updatePassTime;

	/**
	 * 旧密码 多个用:隔开（OLD_PASSWORD）
	 */
	private String oldPassword;

	/**
	 * 启动时间（START_UP_TIME）
	 */
	private Date startUpTime;

	/**
	 * 禁用时间（DISABLE_TIME）
	 */
	private Date disableTime;

	/**
	 * 是否置顶（1 是 0 否）
	 */
	private Integer isTop;

	/**
	 * 置顶时间
	 */
	private Date topTime;

	/**
	 * 个人邀请码
	 */
	private String ownInvitationCode;

	/**
	 * 昵称
	 */
	private String nickName;

	/**
	 * 等级体系id
	 */
	private String salesmanLevelId;

	/**
	 * 基本工资
	 */
	private BigDecimal basePay;

	/**
	 * 邮箱
	 */
	private String email;

	/**
	 * 籍贯
	 */
	private String nativePlace;

	/**
	 * 是否已离职 1是 0否
	 */
	private Integer isQuit;

	/**
	 * 离职日期
	 */
	private Date quitTime;





	/////////// 额外属性

	/**
	 * 角色id
	 */
	private String roleId;

	/**
	 * 角色编码
	 */
	private String roleCode;

	/**
	 * 角色名称
	 */
	private String roleName;

	/**
	 * 公会列表数据
	 */
	List<TradeUnion> tradeUnionList;

	/**
	 * 业务员等级名称
	 */
	private String levelName;

	/**
	 * 登录来源 0 开放平台 1 推广平台 2 内容平台
	 */
	private Integer loginSource;

	/**
	 * 部门编码
	 */
	private String deptCode;

	/**
	 * 部门名称
	 */
	private String deptName;

	/**
	 * 是否第一次登录
	 */
	private Integer isFirstLogin;

	/**
	 * 是否当天第一次登录
	 */
	private Integer isSameDayFirstLogin;

	/**
	 * 是否已签经济合同 1是 0否
	 */
	private Integer isEconomicContract;

	public Integer getIsEconomicContract() {
		return isEconomicContract;
	}

	public void setIsEconomicContract(Integer isEconomicContract) {
		this.isEconomicContract = isEconomicContract;
	}

	public String getLevelName() {
		return levelName;
	}

	public void setLevelName(String levelName) {
		this.levelName = levelName;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPermissionPassword() {
		return permissionPassword;
	}

	public void setPermissionPassword(String permissionPassword) {
		this.permissionPassword = permissionPassword;
	}

	public String getUserNum() {
		return userNum;
	}

	public void setUserNum(String userNum) {
		this.userNum = userNum;
	}

	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getHeadPortrait() {
		return headPortrait;
	}

	public void setHeadPortrait(String headPortrait) {
		this.headPortrait = headPortrait;
	}

	public String getIdCardNum() {
		return idCardNum;
	}

	public void setIdCardNum(String idCardNum) {
		this.idCardNum = idCardNum;
	}

	public String getIdCardPic() {
		return idCardPic;
	}

	public void setIdCardPic(String idCardPic) {
		this.idCardPic = idCardPic;
	}

	public String getIdCardBackpic() {
		return idCardBackpic;
	}

	public void setIdCardBackpic(String idCardBackpic) {
		this.idCardBackpic = idCardBackpic;
	}

	public String getIdCardHold() {
		return idCardHold;
	}

	public void setIdCardHold(String idCardHold) {
		this.idCardHold = idCardHold;
	}

	public String getBankAccount() {
		return bankAccount;
	}

	public void setBankAccount(String bankAccount) {
		this.bankAccount = bankAccount;
	}

	public String getBank() {
		return bank;
	}

	public void setBank(String bank) {
		this.bank = bank;
	}

	public String getBranch() {
		return branch;
	}

	public void setBranch(String branch) {
		this.branch = branch;
	}

	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getInvitationCode() {
		return invitationCode;
	}

	public void setInvitationCode(String invitationCode) {
		this.invitationCode = invitationCode;
	}

	public String getOtherAccount() {
		return otherAccount;
	}

	public void setOtherAccount(String otherAccount) {
		this.otherAccount = otherAccount;
	}

	public Integer getIsDel() {
		return isDel;
	}

	public void setIsDel(Integer isDel) {
		this.isDel = isDel;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getSourceSys() {
		return sourceSys;
	}

	public void setSourceSys(Integer sourceSys) {
		this.sourceSys = sourceSys;
	}

	public Date getFinallyLoginTime() {
		return finallyLoginTime;
	}

	public void setFinallyLoginTime(Date finallyLoginTime) {
		this.finallyLoginTime = finallyLoginTime;
	}

	public String getFinallyLoginIp() {
		return finallyLoginIp;
	}

	public void setFinallyLoginIp(String finallyLoginIp) {
		this.finallyLoginIp = finallyLoginIp;
	}

	public String getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(String creatorId) {
		this.creatorId = creatorId;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getUpdatePassTime() {
		return updatePassTime;
	}

	public void setUpdatePassTime(Date updatePassTime) {
		this.updatePassTime = updatePassTime;
	}

	public String getOldPassword() {
		return oldPassword;
	}

	public void setOldPassword(String oldPassword) {
		this.oldPassword = oldPassword;
	}

	public Date getStartUpTime() {
		return startUpTime;
	}

	public void setStartUpTime(Date startUpTime) {
		this.startUpTime = startUpTime;
	}

	public Date getDisableTime() {
		return disableTime;
	}

	public void setDisableTime(Date disableTime) {
		this.disableTime = disableTime;
	}

	public Integer getIsTop() {
		return isTop;
	}

	public void setIsTop(Integer isTop) {
		this.isTop = isTop;
	}

	public Date getTopTime() {
		return topTime;
	}

	public void setTopTime(Date topTime) {
		this.topTime = topTime;
	}

	public String getOwnInvitationCode() {
		return ownInvitationCode;
	}

	public void setOwnInvitationCode(String ownInvitationCode) {
		this.ownInvitationCode = ownInvitationCode;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getSalesmanLevelId() {
		return salesmanLevelId;
	}

	public void setSalesmanLevelId(String salesmanLevelId) {
		this.salesmanLevelId = salesmanLevelId;
	}

	public BigDecimal getBasePay() {
		return basePay;
	}

	public void setBasePay(BigDecimal basePay) {
		this.basePay = basePay;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public Integer getLoginSource() {
		return loginSource;
	}

	public void setLoginSource(Integer loginSource) {
		this.loginSource = loginSource;
	}

	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public List<TradeUnion> getTradeUnionList() {
		return tradeUnionList;
	}

	public void setTradeUnionList(List<TradeUnion> tradeUnionList) {
		this.tradeUnionList = tradeUnionList;
	}

	public String getDeptCode() {
		return deptCode;
	}

	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public Integer getIsFirstLogin() {
		return isFirstLogin;
	}

	public void setIsFirstLogin(Integer isFirstLogin) {
		this.isFirstLogin = isFirstLogin;
	}

	public Integer getIsSameDayFirstLogin() {
		return isSameDayFirstLogin;
	}

	public void setIsSameDayFirstLogin(Integer isSameDayFirstLogin) {
		this.isSameDayFirstLogin = isSameDayFirstLogin;
	}

	public String getNativePlace() {
		return nativePlace;
	}

	public void setNativePlace(String nativePlace) {
		this.nativePlace = nativePlace;
	}

	public Integer getIsQuit() {
		return isQuit;
	}

	public void setIsQuit(Integer isQuit) {
		this.isQuit = isQuit;
	}

	public Date getQuitTime() {
		return quitTime;
	}

	public void setQuitTime(Date quitTime) {
		this.quitTime = quitTime;
	}

	/**
	 * 用户注册信息配置
	 *
	 * @param userInfo
	 * @param id
	 * @param account
	 * @param password
	 * @param creatorAccount
	 * @param creator
	 * @return
	 */
	public UserInfo setRegisterUserInfo(UserInfo userInfo, String id, String account, String password, String creatorAccount, String creator, Integer status, String name) {
		// 设置ID
		userInfo.setId(id);
		// 设置账户
		userInfo.setAccount(account);
		// 设置密码
		userInfo.setPassword(password);
		// 设置创建人
		userInfo.setCreator(creator);
		// 设置是否删除
		userInfo.setIsDel(0);
		// 设置名称
		userInfo.setName(name);
		// 设置创建时间
		userInfo.setCreateTime(new Date());
		// 设置更新时间
		userInfo.setUpdateTime(new Date());
		// 设置状态
		userInfo.setStatus(status);
		return userInfo;
	}

}
